# -*- coding: UTF-8 -*-

# 导入queue模块
import queue

# 创建一个队列对象
q = queue.Queue()

# 向队列中插入一系列值
list = ['Beijing', 'Tianjin', 'Shanghai', 'ChongQing', 'ShenZhen', 'HongKong', 'NanJing']

for i in list:
    q.put(i)

# 依次从队列中取出值
while not q.empty():
    print(q.get())